/**
 *
 */
package com.angel.mocks.daos.impl;

import java.io.Serializable;
import java.util.Collection;

import org.hibernate.criterion.Restrictions;

import com.angel.dao.generic.impl.GenericHibernateDAO;
import com.angel.mocks.dao.generic.FinalExam;
import com.angel.mocks.dao.generic.Person;
import com.angel.mocks.dao.generic.Teacher;
import com.angel.mocks.daos.FinalExamDAO;

/**
 * @author William
 *
 */
public class FinalExamDAOHibernate extends GenericHibernateDAO<FinalExam, Serializable> implements FinalExamDAO{

	public Collection<FinalExam> findAllByNote(Integer note) {
		return super.findAllByCriteria(Restrictions.eq("note", note));
	}


	public Collection<FinalExam> findAllByPerson(Person person) {
		return super.findAllByCriteria(Restrictions.eq("person", person));
	}


	public Collection<FinalExam> findAllByTeacher(Teacher teacher) {
		return super.findAllByCriteria(Restrictions.eq("teacher", teacher));
	}


}
